home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
176-200
/
scopedisk192
/
atomclockv1.2a
/
atomdoc
< prev
next >
Wrap
Text File
|
1995-03-19
|
8KB
|
208 lines
AtomClock V.1.2a by Art Steinmetz
Compuserve ID: 76044,3204 or FidoNet Amiga Echos
INTRODUCTION
AtomClock will dial the U.S. Naval Observatory in Washington D.C., read the
1200 BAUD time signal their atomic clock puts out and set the Amiga system
clock accordingly. It runs from Workbench or CLI. The default
configuration will work with a Hayes-type modem but parameters can be
adjusted for just about any modem. ATMCLK.ZOO contains only the
executable. ACSRC.ARC contains the full source code. Written in Benchmark
Modula 2. Good example of serial port access and reading icon TOOLTYPES.
QUICKSTART (absolute minimum docs)
If you run from CLI you MUST increase your stack above the default of 4000.
To do this type STACK 10000 from the CLI.
If you have a Hayes-Type Modem and live on Eastern Standard Time you are
ready to go. Click on the icon and sit back. If it is Daylight Savings or
you live in a different zone you must change this parameter. Use INFO from
the Workbench menu and change the TimeZone TOOLTYPE from EST to your zone
(e.g. PDT, MST, etc). Alternatively you can use the "z" argument from CLI.
ATOMCLOCK Z/EDT
will run AtomClock and set your Amiga for Eastern Daylight Time. That's
it.
It is your responsibility to set the hardware clock or the Amiga will
forget the newly set time when you turn it off. There are so many hardware
clocks out there I opted against including that feature in the program. If
you have an Amiga 2000 or A500/A501 open a CLI and type SETCLOCK OPT SAVE
after you run ATOMCLOCK or click on the HARDSET icon included. HARDSET
will do the job from Workbench.
Note that with the exception of unZOOing this darn thing you don't EVER
have to use CLI.
AtomClock recognizes those time zones between Eastern and Pacific, daylight
or standard. It also knows GMT or UTC. If you live outside read on.
If you have an uncommon modem read on.
For some modest AREXX support read on.
FILES SUPPLIED IN THIS ARCHIVE
ATMCLK.ZOO
AtomClock /* the program. */
AtomClock.info
AtomDoc /* this file */
AtomDoc.info
HardSet /* sets hardware clock to system time */
HardSet.info
SetTime.rexx /* AREXX script for once a month sets */
SetTime.rexx.info
ALSO LOOK FOR (not included here)
ATMSRC.ARC
AmigaTime.def by Mark Olbert
AmigaTime.mod by Mark Olbert
AtomClock.mod
AtomDoc
AtomUtils.def
AtomUtils.mod
GetAtomParams.def
GetAtomParams.mod
Serial.def by Steve Faiwiszewski
Serial.mod by Steve Faiwiszewski
StringUtils.def by Mark Olbert
StringUtils.mod by Mark Olbert
Time.def by Mark Olbert
Time.mod by Mark Olbert
makeatom list of files in proper compilation order
INSTRUCTIONS
Every possible parameter of ATOMCLOCK can be set by command line arguments
and/or TOOLTYPES in the INFO record from Workbench.
To change any parameter from Workbench select the AtomClk icon and choose
INFO from the Workbench menu. The TOOLTYPES field has up and down arrows
you can click on to scroll through the parameter list. Find the one you
want to change and click on the text. Change only the text to the RIGHT of
the equals sign. For instance, in April, you would want to adjust AtomClk
for daylight savings time so you would change TimeZone=EST to TimeZone=EDT.
When you are done hit the Return key and click on SAVE.
If you use the CLI you change parameters when you run AtomClk with command
line parameters. Each arg. is represented by a single letter followed by a
slash followed by the parameter. For example if you currently are living on
Central Standard Time you will invoke AtomClk by typing:
ATOMCLK z/CST
Arguments can be in any order. Unlike the Workbench INFO method, parameter
changes are not saved so you have to use the same argument each time. For
this reason a batch file is recommended if you have a lot of parameter
changes.
The various parameters are below. 99% of you will only have to change the
time zone parameter...ever (I hope).
TOOLTYPE CLI FUNCTION DEFAULT
-------- --- ---------------------------- -----------
TimeZone z Time zone (i.e. EST, PDT). EST
Use GMT with "o" flag below
if zone is not range EDT..PST.
Offset o Hours offset from GMT. Ignore -5
if you live in a supported
time zone.
BAUD b BAUD rate. 1200
PhoneNumber n Phone number 1-202-653-0351
Prefix p Modem dial prefix ATDT
Reset r Modem reset string ATZ^M
Calls c Max call attempts 3
Tries t Try to read X lines before 20
giving up (avoids reading
line noise forever).
Suffix s Modem dial suffix ^M (Enter)
Busy b Modem 'busy' message. BUSY
NoAnswer w Modem 'no answer' message. NO CARRIER
Typing ATOMCLOCK without any arguments is equivalent to typing
ATOMCLOCK z/EST o/-5 b/1200 n/1-202-653-0351 p/ATDT r/ATZ^M c/3 t/20
s/^M b/BUSY w/NO CARRIER
A word about time zones for those of you not living between New York and
L.A. You have to calculate how many zones you are from Greenwich, England
yourself. Suppose you hang out in Paris, one zone west (I suppose) from
Greenwich Mean Time. You would make the TimeZone GMT (or UTC) and make
the Offset 1. From CLI: ATOMCLK z/GMT o/1. Nothing to it.
DISTRIBUTION ARCHIVE NOTES
I've tried to make this as "Workbenchable" as possible. Aside from the
program being runnable from Workbench, an icon for the docs to use the tool
c:MORE is included. You can dump MORE if you know what you're doing.
HARDSET is batch file runable from WB. Its icon calls C:XICON.
PROGRAMMING NOTES
This was an exercise in the, well, modularity of Modula 2. This was a
fairly simple project because I didn't do a lot of the work. I took off
the shelf modules written by other folks and just linked 'em in. They do
the low level work of the program while I just designed and wrote the front
end. The readability of Modula makes this a snap to do with even sparsely
commented code.
Authors of the routines used here are equal (if unknowing) partners in the
venture. Mark Olbert provided the date and string routines. Steve
Faiwiszewski provided the rather tricky (read "way over my head") serial
port routines. Thanks also to Steve for help with support for generic
modems. Any remaining bugs are, of course, my fault but your tough luck
(Hey, the source is free).
All of my code is placed in the public domain. Enjoy. Steve and Mark have
appropriate notices in their code. Everything in this distribution archive
is freely redistributable.
-- Art Steinmetz 9/24/88
--------
Changes to version 1.1
Doc file amended to note file name change requirement and CLI stack
requirements.
AtomClock now sets a CLI return code greater than zero if it does not
succeed in changing system time. A bug in AmigaDOS means this isn't useful
unless you're running a command shell that will read it. WShell and AREXX
can make use of this. A return code of 0 means the system time was set. A
return code of one (1) means that the user hit the close gadget and the
time probably wasn't set. A higher return code means some other failure
occured.
If you have AREXX and WShell a script file provided will run atomclock once
a month and set the hardware clock.
-- Art Steinmetz 10/16/88
--------
Changes to version 1.2a
This archive is now distributed only in ZOO compression format. This
eliminates the problem a lot of people were having with the name in the
ARCed version being truncated. Originally the program had to be named
ATOMCLOCK since the name was hard coded in it. BAD, BAD BAD, Art! Never
hard code ANYTHING the user can change (w/o using NewZap, anyway). Now
AtomClock looks to see what its name is.
The Prefix Tooltype (and CLI p/ option) is now AT&D2DT. This should
force the modem to hang up properly. If your modem does not understand
the &D2 command find out if it can be commanded to hang up on a change in
DTR stat and put that in the prefix.
MORE and IXECUTE are no longer included since the Amiga 1.3 command set
includes MORE and XICON.
-- Art Steinmetz 5/30/89